<ui:composition template="/WEB-INF/template/default.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:jawr="https://jawr.dev.java.net/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:form="http://www.springframework.org/tags/form">
	<ui:define name="title">Welcome</ui:define>
	<ui:define name="content">

		<h:form>
			<h:outputText value="#{push.uuid}" />
			<a4j:push interval="1000" eventProducer="#{push.addListener}"
				reRender="push,out" enabled="#{push.enabled}" id="push" />
			<rich:panel>
				<f:facet name="header">
					<h:outputText value="Push Example" />
				</f:facet>
				<h:panelGrid columns="1" id="out">
					<h:outputText rendered="#{!push.enabled}"
						value="Press Start to run push example" />
					<h:panelGroup rendered="#{push.enabled}">
						<h:outputText value="Generated UUID:" />
						<h:outputText value="#{push.uuid}" />
					</h:panelGroup>
					<a4j:outputPanel id="button">
						<a4j:commandButton value="Start" action="start"
							ajaxSingle="true" rendered="#{!push.enabled}"
							reRender="push, out" />
						<a4j:commandButton value="Stop" action="#{push.stop}"
							ajaxSingle="true" rendered="#{push.enabled}" reRender="push, out" />
						</a4j:outputPanel>
				</h:panelGrid>
			</rich:panel>
		</h:form>
		</ui:define>
</ui:composition>